<template>
  <div>
    <ul>
      <li v-for="item in todos" :key="item.id">
        <!-- 子组件不能决定结构和样式，将每一项传递给父组件去决定 -->
        <slot :todo="item"></slot>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "List",
  props: ["todos"],
};
</script>

<style>
</style>